package com.jvm123.postgres

import com.jvm123.postgres.entity.Student
import com.jvm123.postgres.repo.StudentRepo
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ContextConfiguration
import spock.lang.Specification


/**
 *
 * @author yawn
 *     2019/9/16 16:05
 */
@SpringBootTest
@ContextConfiguration
class StudentSpec extends Specification {

    @Autowired
    StudentRepo studentRepo

    def "add persons"() {
        when:
        for (i in 0..9) {
            studentRepo.save(new Student(name: "yawn", age: 18, birthDay: new Date()))
        }
        then:
        true
    }



}
